package com.mazaiting.auth.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.mazaiting.auth.constant.SecurityConst;

import java.util.List;

/**
 * token 中 payload 信息内容
 *
 * @author mazaiting
 * @create_time 2022/9/17 23:22
 */
public class PayloadInfo {
    /**
     * 用户 ID
     */
    @JSONField(name = SecurityConst.KEY_USER_ID)
    private Long userId;

    /**
     * 部门 ID
     */
    @JSONField(name = SecurityConst.KEY_DEPT_ID)
    private Long deptId;

    /**
     * 用户名
     */
    private String username;
    /**
     * 用户域
     */
    private List<String> scope;

    /**
     * 过期时间
     */
    @JSONField(name = SecurityConst.KEY_EXP)
    private Long expire;

    /**
     * 认证角色
     */
    private List<String> authorities;

    /**
     * token 唯一标识
     */
    private String jti;

    /**
     * 客户端 ID
     */
    @JSONField(name = SecurityConst.KEY_CLIENT_ID)
    private String clientId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<String> getScope() {
        return scope;
    }

    public void setScope(List<String> scope) {
        this.scope = scope;
    }

    public Long getExpire() {
        return expire;
    }

    public void setExpire(Long expire) {
        this.expire = expire;
    }

    public List<String> getAuthorities() {
        return authorities;
    }

    public void setAuthorities(List<String> authorities) {
        this.authorities = authorities;
    }

    public String getJti() {
        return jti;
    }

    public void setJti(String jti) {
        this.jti = jti;
    }

    public String getClientId() {
        return clientId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }


}
